home *** CD-ROM | disk | FTP | other *** search
- //-----------------------------------------------------
- // StatusBarAndAutoScroll.cs ⌐ 2001 by Charles Petzold
- //-----------------------------------------------------
- using System;
- using System.Drawing;
- using System.Windows.Forms;
-
- class StatusBarAndAutoScroll: Form
- {
- public static void Main()
- {
- Application.Run(new StatusBarAndAutoScroll());
- }
- public StatusBarAndAutoScroll()
- {
- Text = "Barra de estado y autodesplazamiento";
- AutoScroll = true;
-
- // Crea la barra de estado.
-
- StatusBar sb = new StatusBar();
- sb.Parent = this;
- sb.Text = "Mi primer texto en la barra de estado";
-
- // Crea etiquetas como controles secundarios del formulario.
-
- Label label = new Label();
- label.Parent = this;
- label.Text = "Superior izquierda";
- label.Location = new Point(0, 0);
-
- label = new Label();
- label.Parent = this;
- label.Text = "Inferior derecha";
- label.Location = new Point(250, 250);
- label.AutoSize = true;
- }
- }
-